<?xml version="1.0" encoding="UTF-8"?>

<!--
  Licensed to the Apache Software Foundation (ASF) under one or more
  contributor license agreements.  See the NOTICE file distributed with
  this work for additional information regarding copyright ownership.
  The ASF licenses this file to You under the Apache License, Version 2.0
  (the "License"); you may not use this file except in compliance with
  the License.  You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
-->

<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2
          http://maven.apache.org/xsd/assembly-1.1.2.xsd">
    <id>dependencies</id>

    <formats>
        <format>dir</format>
    </formats>

    <includeBaseDirectory>false</includeBaseDirectory>

    <moduleSets>
        <moduleSet>
            <includes>
                <include>${project.groupId}:ignite-spring</include>
                <include>${project.groupId}:ignite-indexing</include>
                <include>${project.groupId}:ignite-control-utility</include>
            </includes>
            <sources>
                <includeModuleDirectory>true</includeModuleDirectory>
                <fileSets>
                    <fileSet>
                        <directory>${basedir}</directory>
                        <outputDirectory>/</outputDirectory>
                        <includes>
                            <include>README.txt</include>
                            <include>licenses/**</include>
                        </includes>
                    </fileSet>
                    <fileSet>
                        <directory>${basedir}/target/licenses</directory>
                        <outputDirectory>/licenses</outputDirectory>
                    </fileSet>
                    <fileSet>
                        <directory>target/libs</directory>
                        <outputDirectory>/</outputDirectory>
                    </fileSet>
                    <fileSet>
                        <directory>target</directory>
                        <outputDirectory>/</outputDirectory>
                        <includes>
                            <include>*.jar</include>
                        </includes>
                        <excludes>
                            <exclude>*-tests.jar</exclude>
                            <exclude>*-javadoc.jar</exclude>
                            <exclude>*-sources.jar</exclude>
                        </excludes>
                    </fileSet>
                </fileSets>
            </sources>
        </moduleSet>

        <moduleSet>
            <includes>
                <include>${project.groupId}:ignite-core</include>
            </includes>
            <sources>
                <includeModuleDirectory>false</includeModuleDirectory>
                <fileSets>
                    <fileSet>
                        <directory>${basedir}</directory>
                        <outputDirectory>/</outputDirectory>
                        <includes>
                            <include>README.txt</include>
                            <include>licenses/**</include>
                        </includes>
                    </fileSet>
                    <fileSet>
                        <directory>${basedir}/target/licenses</directory>
                        <outputDirectory>/licenses</outputDirectory>
                    </fileSet>
                    <fileSet>
                        <directory>target/libs</directory>
                        <outputDirectory>/</outputDirectory>
                    </fileSet>
                    <fileSet>
                        <directory>target</directory>
                        <outputDirectory>/</outputDirectory>
                        <includes>
                            <include>*.jar</include>
                        </includes>
                        <excludes>
                            <exclude>*-tests.jar</exclude>
                            <exclude>*-javadoc.jar</exclude>
                            <exclude>*-sources.jar</exclude>
                        </excludes>
                    </fileSet>
                </fileSets>
            </sources>
        </moduleSet>

        <moduleSet>
            <includeSubModules>true</includeSubModules>
            <excludes>
                <exclude>${project.groupId}:ignite-bom</exclude>
                <exclude>${project.groupId}:ignite-core</exclude>
                <exclude>${project.groupId}:ignite-clients</exclude>
                <exclude>${project.groupId}:ignite-spring</exclude>
                <exclude>${project.groupId}:ignite-tools</exclude>
                <exclude>${project.groupId}:ignite-extdata-p2p</exclude>
                <exclude>${project.groupId}:ignite-extdata-uri</exclude>
                <exclude>${project.groupId}:ignite-extdata-uri-dep</exclude>
                <exclude>${project.groupId}:ignite-extdata-pluggable</exclude>
                <exclude>${project.groupId}:ignite-examples</exclude>
                <exclude>${project.groupId}:ignite-indexing</exclude>
                <exclude>${project.groupId}:ignite-codegen</exclude>
                <exclude>${project.groupId}:ignite-schedule</exclude>
                <exclude>${project.groupId}:ignite-appserver-test</exclude>
                <exclude>${project.groupId}:ignite-websphere-test</exclude>
                <exclude>${project.groupId}:ignite-yardstick</exclude>
                <exclude>${project.groupId}:ignite-benchmarks</exclude>
                <exclude>${project.groupId}:ignite-dev-utils</exclude>
                <exclude>${project.groupId}:ignite-extdata-platform</exclude>
                <exclude>${project.groupId}:ignite-compatibility</exclude>
                <exclude>${project.groupId}:ignite-sqlline</exclude>
                <exclude>${project.groupId}:ignite-control-utility</exclude>
            </excludes>
            <sources>
                <includeModuleDirectory>true</includeModuleDirectory>
                <outputDirectoryMapping>optional/${module.artifactId}</outputDirectoryMapping>
                <fileSets>
                    <fileSet>
                        <directory>${basedir}</directory>
                        <outputDirectory>/</outputDirectory>
                        <includes>
                            <include>README.txt</include>
                            <include>licenses/**</include>
                        </includes>
                    </fileSet>
                    <fileSet>
                        <directory>${basedir}/target/licenses</directory>
                        <outputDirectory>/licenses</outputDirectory>
                    </fileSet>
                    <fileSet>
                        <directory>target/libs</directory>
                        <outputDirectory>/</outputDirectory>
                    </fileSet>
                    <fileSet>
                        <directory>target/classes</directory>
                        <outputDirectory>/</outputDirectory>
                        <includes>
                            <include>features.xml</include>
                        </includes>
                    </fileSet>
                    <fileSet>
                        <directory>target</directory>
                        <outputDirectory>/</outputDirectory>
                        <includes>
                            <include>*.jar</include>
                        </includes>
                        <excludes>
                            <exclude>*-tests.jar</exclude>
                            <exclude>*-javadoc.jar</exclude>
                            <exclude>*-sources.jar</exclude>
                        </excludes>
                    </fileSet>
                </fileSets>
            </sources>
        </moduleSet>
    </moduleSets>
</assembly>
